﻿using Saxxon.LibDoomSharp;
using Saxxon.LibDoomSharp.Lumps;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace Saxxon.LibDoomSharpTest
{
    class Program
    {
        static void Main(string[] args)
        {
            string steamDoomDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), @"Steam\SteamApps\common\Doom 2\base");
            string steamDoomWadFileName = @"DOOM2.WAD";
            string filePath = Path.Combine(steamDoomDataPath, steamDoomWadFileName);

            Wad wad = new Wad();
            wad.ReadFromFile(filePath);

            foreach (Lump lump in wad.Lumps)
            {
                if (lump.Name == "THINGS")
                {
                    Things things = new Things(lump);
                }

                if (lump.Name == "LINEDEFS")
                {
                    Linedefs linedefs = new Linedefs(lump);
                }

                if (lump.Name == "SIDEDEFS")
                {
                    Sidedefs sidedefs = new Sidedefs(lump);
                }

                if (lump.Name == "VERTEXES")
                {
                    Vertexes vertexes = new Vertexes(lump);
                }
            }
        }
    }
}
